/*
prop-types属性验证自带的小组件
 */
import React from "react";

export default function Sidebar(props) {
    console.log(props);
    let {bg,fz,fw,position}=props
    let obj1={
        left:3
    }
    let obj2={
        left:6
    }
    let obj={
        fontSize:fz,fontWeight:fw,
        width:"200px",
        position:"fixed"
    }
    let styleObj=position === 'left' ? {...obj,...obj1} :{...obj,...obj2}
  return (
    <div style={styleObj}>
        <ul >
            <li  style={{background:bg}}>23</li>
            <li style={{fontSize:fz,fontWeight:fw}}>达瓦大</li>
            <li >23123</li>
            <li>达瓦达瓦大</li>
            <li>达瓦大大</li>
            <li>风发顺丰</li>
            <li>达瓦达瓦大</li>
        </ul>
    </div>
  )
}
